package com.boxuegu.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class SQLiteHelper extends SQLiteOpenHelper {
    public SQLiteHelper(Context context) {//当new出该对象时，自动创建数据库文件
        super(context, "bxg.db", null, 1);
    }
    @Override
    public void onCreate(SQLiteDatabase db) {//创建数据表，创建对象时，自动执行该方法
        db.execSQL("create table if not exists videoPlayList(" +
                "_id integer primary key autoincrement," +
                "userName varchar," +
                "id int," +
                "videoId int," +
                "title varchar," +
                "videoTitle varchar," +
                "videoPath varchar" +
                ")");
    }
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
